const config = {
  //服务器端口
  server: {
    port: process.env.APP_PORT
  },
  //数据库相关配置
  db: {
    db_host: process.env.MYSQL_HOST,
    db_port: process.env.MYSQL_PORT,
    db_user: process.env.MYSQL_USER,
    db_pwd: process.env.MYSQL_PWD,
    db_name: process.env.MYSQL_DB
  },
  //日志相关配置
  log: {
    appenders: {
      cheese: { type: 'file', filename: 'logs/cheese.log' },
      access: { type: 'file', filename: 'logs/access.log' },
      db: { type: 'file', filename: 'logs/db.log' }
      //consoleout: { type: 'console' }
    },
    categories: {
      default: { appenders: ['cheese'], level: 'info' },
      //访问日志
      access: { appenders: ['access'], level: 'info' },
      db: { appenders: ['db'], level: 'info' }
      //   anything: { appenders: ['consoleout'], level: 'debug' }
    }
  },
  jwt: {
    jwt_secret: process.env.JWT_SECRET,
    jwt_expire: process.env.JWT_EXPIRE
  }
}

export default config
